Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Enable reloading BT xml file with same name (backport #4209) #4407

Merged

Conversation

christophfroehlich
Copy link
Contributor

Manual backport of #4209 (comment)

* Let BtActionServer overwrite xml

Co-authored-by: Johannes Huemer <[email protected]>
Signed-off-by: Johannes Huemer <[email protected]>
Signed-off-by: Christoph Froehlich <[email protected]>

* Make a ROS parameter for it

Signed-off-by: Christoph Froehlich <[email protected]>

* Rename flag to always reload BT xml file

Signed-off-by: Johannes Huemer <[email protected]>

---------

Signed-off-by: Johannes Huemer <[email protected]>
Signed-off-by: Christoph Froehlich <[email protected]>
Co-authored-by: Christoph Froehlich <[email protected]>
Copy link
Contributor

mergify bot commented Jun 8, 2024

@christophfroehlich, all pull requests must be targeted towards the main development branch.
Once merged into main, it is possible to backport to @iron, but it must be in main
to have these changes reflected into new distributions.

@christophfroehlich
Copy link
Contributor Author

I see the same test results on iron as well as on this branch -> I think they are not related.

$ colcon test-result
build/nav2_behavior_tree/Testing/20240608-1928/Test.xml: 60 tests, 0 errors, 2 failures, 0 skipped
build/nav2_behavior_tree/test_results/nav2_behavior_tree/cppcheck.xunit.xml: 173 tests, 0 errors, 2 failures, 0 skipped
build/nav2_behavior_tree/test_results/nav2_behavior_tree/test_single_trigger_node.gtest.xml: 1 test, 0 errors, 1 failure, 0 skipped

@SteveMacenski
Copy link
Member

build/nav2_behavior_tree/Testing/20240608-1928/Test.xml: 60 tests, 0 errors, 2 failures, 0 skipped

What are the failures? That's relevant to check.

@christophfroehlich
Copy link
Contributor Author

$ colcon test-result --verbose
build/nav2_behavior_tree/Testing/20240611-0614/Test.xml: 61 tests, 0 errors, 2 failures, 0 skipped
- cppcheck
  <<< failure message
    -- run_test.py: invoking following command in '/workspaces/ros2_iron_ws/src/navigation2/nav2_behavior_tree':
     - /opt/ros/iron/bin/ament_cppcheck --xunit-file /workspaces/ros2_iron_ws/build/nav2_behavior_tree/test_results/nav2_behavior_tree/cppcheck.xunit.xml --include_dirs /workspaces/ros2_iron_ws/src/navigation2/nav2_behavior_tree/include
    [plugins/condition/is_stuck_condition.cpp:107]: (error: derefInvalidIterator) Dereference of an invalid iterator: odom_history_.end()
    [plugins/condition/is_stuck_condition.cpp:111]: (error: derefInvalidIterator) Dereference of an invalid iterator: odom_history_.end()
    2 errors
    -- run_test.py: return code 1
    -- run_test.py: verify result file '/workspaces/ros2_iron_ws/build/nav2_behavior_tree/test_results/nav2_behavior_tree/cppcheck.xunit.xml'
  >>>
- test_single_trigger_node
  <<< failure message
    -- run_test.py: invoking following command in '/workspaces/ros2_iron_ws/build/nav2_behavior_tree/test/plugins/decorator':
     - /workspaces/ros2_iron_ws/build/nav2_behavior_tree/test/plugins/decorator/test_single_trigger_node --gtest_output=xml:/workspaces/ros2_iron_ws/build/nav2_behavior_tree/test_results/nav2_behavior_tree/test_single_trigger_node.gtest.xml
    [==========] Running 1 test from 1 test suite.
    [----------] Global test environment set-up.
    [----------] 1 test from SingleTriggerTestFixture
    Warning: Invalid frame ID "map" passed to canTransform argument target_frame - frame does not exist
             at line 93 in ./src/buffer_core.cpp
    [INFO] [1718086553.963673758] [test_behavior_tree_fixture]: Transforms are available now!
    [ RUN      ] SingleTriggerTestFixture.test_behavior
    /workspaces/ros2_iron_ws/src/navigation2/nav2_behavior_tree/test/plugins/decorator/test_single_trigger_node.cpp:75: Failure
    Expected equality of these values:
      bt_node_->executeTick()
        Which is: FAILURE
      BT::NodeStatus::RUNNING
        Which is: RUNNING
    /workspaces/ros2_iron_ws/src/navigation2/nav2_behavior_tree/test/plugins/decorator/test_single_trigger_node.cpp:77: Failure
    Expected equality of these values:
      bt_node_->executeTick()
        Which is: FAILURE
      BT::NodeStatus::SUCCESS
        Which is: SUCCESS
    [  FAILED  ] SingleTriggerTestFixture.test_behavior (0 ms)
    [----------] 1 test from SingleTriggerTestFixture (0 ms total)
    
    [----------] Global test environment tear-down
    [==========] 1 test from 1 test suite ran. (114 ms total)
    [  PASSED  ] 0 tests.
    [  FAILED  ] 1 test, listed below:
    [  FAILED  ] SingleTriggerTestFixture.test_behavior
    
     1 FAILED TEST
    -- run_test.py: return code 1
    -- run_test.py: inject classname prefix into gtest result file '/workspaces/ros2_iron_ws/build/nav2_behavior_tree/test_results/nav2_behavior_tree/test_single_trigger_node.gtest.xml'
    -- run_test.py: verify result file '/workspaces/ros2_iron_ws/build/nav2_behavior_tree/test_results/nav2_behavior_tree/test_single_trigger_node.gtest.xml'
  >>>
build/nav2_behavior_tree/test_results/nav2_behavior_tree/cppcheck.xunit.xml: 176 tests, 0 errors, 2 failures, 0 skipped
- nav2_behavior_tree.cppcheck error: derefInvalidIterator (plugins/condition/is_stuck_condition.cpp:107)
  <<< failure message
    Dereference of an invalid iterator: odom_history_.end()
  >>>
- nav2_behavior_tree.cppcheck error: derefInvalidIterator (plugins/condition/is_stuck_condition.cpp:111)
  <<< failure message
    Dereference of an invalid iterator: odom_history_.end()
  >>>
build/nav2_behavior_tree/test_results/nav2_behavior_tree/test_single_trigger_node.gtest.xml: 1 test, 0 errors, 1 failure, 0 skipped
- nav2_behavior_tree.SingleTriggerTestFixture test_behavior
  <<< failure message
    /workspaces/ros2_iron_ws/src/navigation2/nav2_behavior_tree/test/plugins/decorator/test_single_trigger_node.cpp:75
    Expected equality of these values:
      bt_node_->executeTick()
        Which is: FAILURE
      BT::NodeStatus::RUNNING
        Which is: RUNNING
    /workspaces/ros2_iron_ws/src/navigation2/nav2_behavior_tree/test/plugins/decorator/test_single_trigger_node.cpp:77
    Expected equality of these values:
      bt_node_->executeTick()
        Which is: FAILURE
      BT::NodeStatus::SUCCESS
        Which is: SUCCESS
  >>>

Summary: 867 tests, 0 errors, 5 failures, 0 skipped

@SteveMacenski SteveMacenski merged commit b4f0795 into ros-navigation:iron Jun 11, 2024
2 of 3 checks passed
@christophfroehlich christophfroehlich deleted the reload_bt_iron branch June 12, 2024 07:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants